package com.lesson1;

import io.netty.channel.Channel;

import java.util.HashMap;

/**
 * 唯一标识和 Channel 绑定 保存全局,使用时直接取出对应的 Channel
 * @author liliang
 * @date 2019/10/26.
 */
public class ChannelRel {

    private static HashMap<String, Channel> mapper = new HashMap<>();

    public static void put(String sendId, Channel channel) {
        mapper.put(sendId, channel);
    }

    public static Channel get(String sendId) {
        return mapper.get(sendId);
    }
}
